from poker_bot.admin_panel.app.views import MyBaseModelView
from poker_bot.admin_panel.app.views.auth_mixin import AuthMixin


class UserModelView(MyBaseModelView, AuthMixin):
    column_list = (
        "id",
        "telegram_id",
        "username",
        "referrals",
        "is_subscribed",
        "created_at",
    )

    form_excluded_columns = ("lang_code", "updated_at")

    column_filters = ("telegram_id", "username", "is_subscribed", "created_at")

    column_labels = {
        "role": "Роль",
        "telegram_id": "ID в телеграме",
        "username": "Юзернейм в телеграме",
        "lang_code": "Язык",
        "referrals": "Рефералы",
        "accounts": "Аккаунты",
        "selected_account_id": "Выбранный id аккаунта",
        "deposits": "Депозиты",
        "withdrawals": "Запросы на вывод",
        "referrer": "Пригласивший",
        "is_subscribed": "Подписан на соц сети",
        "was_created": "Дата создания",
        "created_at": "Дата регистрации",
    }

    column_default_sort = ("id", True)
